package niuke;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class 删除公共字符串 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String str1 = br.readLine().toString();
        String str2 = br.readLine().toString();

        String str3 = get(str1,str2);
        System.out.println(str3);

    }

    public static String get(String str1,String str2){
        StringBuffer sb = new StringBuffer();
        for (int i = 0;i< str1.length();i++){
            char c = str1.charAt(i);
            if ((str2.indexOf(c)) == -1){
                sb.append(c);
            }
        }
        return sb.toString();

    }
}
